#include "RsGisLibCMDCalibration.h"

RsGisLibCMDCalibration::RsGisLibCMDCalibration(RsgisPortal* Port)
{
	ClientPort = Port;

	rsgisClbLandtoRadi = NULL;
	rsgisClbLandtoRadiMultiAdd = NULL;
	rsgisClbSpot5toRadi = NULL;
	rsgisClbWdView2toRadi = NULL;
	rsgisClbTOARefltoRadi = NULL;
	rsgisClbRaditoTOARefl = NULL;
	rsgisClbLandTherRaditoTherBrt = NULL;
	rsgisClbApply6sCoeSinglePara = NULL;
	rsgisClbApply6sCoeElevLutPara = NULL;
	rsgisClbApply6sCoeElevAotLutPara = NULL;
	rsgisClbCalcStandReflSd2010 = NULL;
	rsgisClbApplySubOffsets = NULL;
	rsgisClbApplySubSinOffsets = NULL;
	rsgisClbCalIrradianceImgElevLut = NULL;
	rsgisClbSatuPixelsMask = NULL;
	rsgisClbCalNadImgViewAngle = NULL;
}

RsGisLibCMDCalibration::~RsGisLibCMDCalibration()
{
	if (rsgisClbLandtoRadi)
		delete(rsgisClbLandtoRadi);
	if (rsgisClbLandtoRadiMultiAdd)
		delete(rsgisClbLandtoRadiMultiAdd);
	if (rsgisClbSpot5toRadi)
		delete(rsgisClbSpot5toRadi);
	if (rsgisClbWdView2toRadi)
		delete(rsgisClbWdView2toRadi);
	if (rsgisClbTOARefltoRadi)
		delete(rsgisClbTOARefltoRadi);
	if (rsgisClbRaditoTOARefl)
		delete(rsgisClbRaditoTOARefl);
	if (rsgisClbLandTherRaditoTherBrt)
		delete(rsgisClbLandTherRaditoTherBrt);
	if (rsgisClbApply6sCoeSinglePara)
		delete(rsgisClbApply6sCoeSinglePara);
	if (rsgisClbApply6sCoeElevLutPara)
		delete(rsgisClbApply6sCoeElevLutPara);
	if (rsgisClbApply6sCoeElevAotLutPara)
		delete(rsgisClbApply6sCoeElevAotLutPara);
	if (rsgisClbCalcStandReflSd2010)
		delete(rsgisClbCalcStandReflSd2010);
	if (rsgisClbApplySubOffsets)
		delete(rsgisClbApplySubOffsets);
	if (rsgisClbApplySubSinOffsets)
		delete(rsgisClbApplySubSinOffsets);
	if (rsgisClbCalIrradianceImgElevLut)
		delete(rsgisClbCalIrradianceImgElevLut);
	if (rsgisClbSatuPixelsMask)
		delete(rsgisClbSatuPixelsMask);
	if (rsgisClbCalNadImgViewAngle)
		delete(rsgisClbCalNadImgViewAngle);

	rsgisClbLandtoRadi = NULL;
	rsgisClbLandtoRadiMultiAdd = NULL;
	rsgisClbSpot5toRadi = NULL;
	rsgisClbWdView2toRadi = NULL;
	rsgisClbTOARefltoRadi = NULL;
	rsgisClbRaditoTOARefl = NULL;
	rsgisClbLandTherRaditoTherBrt = NULL;
	rsgisClbApply6sCoeSinglePara = NULL;
	rsgisClbApply6sCoeElevLutPara = NULL;
	rsgisClbApply6sCoeElevAotLutPara = NULL;
	rsgisClbCalcStandReflSd2010 = NULL;
	rsgisClbApplySubOffsets = NULL;
	rsgisClbApplySubSinOffsets = NULL;
	rsgisClbCalIrradianceImgElevLut = NULL;
	rsgisClbSatuPixelsMask = NULL;
	rsgisClbCalNadImgViewAngle = NULL;
}

void RsGisLibCMDCalibration::ClbLandtoRadi()
{
	rsgisClbLandtoRadi = new RsGisLibClbLandtoRadi(ClientPort, NULL);
	rsgisClbLandtoRadi->show();
}

void RsGisLibCMDCalibration::ClbLandtoRadiMultiAdd()
{
	rsgisClbLandtoRadiMultiAdd = new RsGisLibClbLandtoRadiMultiAdd(ClientPort, NULL);
	rsgisClbLandtoRadiMultiAdd->show();
}

void RsGisLibCMDCalibration::ClbSpot5toRadi()
{
	rsgisClbSpot5toRadi = new RsGisLibClbSpot5toRadi(ClientPort, NULL);
	rsgisClbSpot5toRadi->show();
}

void RsGisLibCMDCalibration::ClbWdView2toRadi()
{
	rsgisClbWdView2toRadi = new RsGisLibClbWdView2toRadi(ClientPort, NULL);
	rsgisClbWdView2toRadi->show();
}

void RsGisLibCMDCalibration::ClbTOARefltoRadi()
{
	rsgisClbTOARefltoRadi = new RsGisLibClbTOARefltoRadi(ClientPort, NULL);
	rsgisClbTOARefltoRadi->show();
}

void RsGisLibCMDCalibration::ClbRaditoTOARefl()
{
	rsgisClbRaditoTOARefl = new RsGisLibClbRaditoTOARefl(ClientPort, NULL);
	rsgisClbRaditoTOARefl->show();
}

void RsGisLibCMDCalibration::ClbLandTherRaditoTherBrt()
{
	rsgisClbLandTherRaditoTherBrt = new RsGisLibClbLandTherRaditoTherBrt(ClientPort, NULL);
	rsgisClbLandTherRaditoTherBrt->show();
}

void RsGisLibCMDCalibration::ClbApply6sCoeSinglePara()
{
	rsgisClbApply6sCoeSinglePara = new RsGisLibClbApply6sCoeSinglePara(ClientPort, NULL);
	rsgisClbApply6sCoeSinglePara->show();
}

void RsGisLibCMDCalibration::ClbApply6sCoeElevLutPara()
{
	rsgisClbApply6sCoeElevLutPara = new RsGisLibClbApply6sCoeElevLutPara(ClientPort, NULL);
	rsgisClbApply6sCoeElevLutPara->show();
}

void RsGisLibCMDCalibration::ClbApply6sCoeElevAotLutPara()
{
	rsgisClbApply6sCoeElevAotLutPara = new RsGisLibClbApply6sCoeElevAotLutPara(ClientPort, NULL);
	rsgisClbApply6sCoeElevAotLutPara->show();
}

void RsGisLibCMDCalibration::ClbCalcStandReflSd2010()
{
	rsgisClbCalcStandReflSd2010 = new RsGisLibClbCalcStandReflSd2010(ClientPort, NULL);
	rsgisClbCalcStandReflSd2010->show();
}

void RsGisLibCMDCalibration::ClbApplySubOffsets()
{
	rsgisClbApplySubOffsets = new RsGisLibClbApplySubOffsets(ClientPort, NULL);
	rsgisClbApplySubOffsets->show();
}

void RsGisLibCMDCalibration::ClbApplySubSinOffsets()
{
	rsgisClbApplySubSinOffsets = new RsGisLibClbApplySubSinOffsets(ClientPort, NULL);
	rsgisClbApplySubSinOffsets->show();
}

void RsGisLibCMDCalibration::ClbCalIrradianceImgElevLut()
{
	rsgisClbCalIrradianceImgElevLut = new RsGisLibClbCalIrradianceImgElevLut(ClientPort, NULL);
	rsgisClbCalIrradianceImgElevLut->show();
}

void RsGisLibCMDCalibration::ClbSatuPixelsMask()
{
	rsgisClbSatuPixelsMask = new RsGisLibClbSatuPixelsMask(ClientPort, NULL);
	rsgisClbSatuPixelsMask->show();
}

void RsGisLibCMDCalibration::ClbCalNadImgViewAngle()
{
	rsgisClbCalNadImgViewAngle = new RsGisLibClbCalNadImgViewAngle(ClientPort, NULL);
	rsgisClbCalNadImgViewAngle->show();
}
